//
//  ViewController.m
//  10505
//
//  Created by student on 16/2/21.
//  Copyright © 2016年 niit. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()
@property (weak, nonatomic) IBOutlet UISlider *redSlider;
@property (weak, nonatomic) IBOutlet UISlider *greenSlider;
@property (weak, nonatomic) IBOutlet UISlider *blueSlider;
@property (weak, nonatomic) IBOutlet UIImageView *ImageView;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
- (IBAction)ColorChanged:(UISlider *)sender
{
    int valueRed = self.redSlider.value;
    int valueGreen = self.greenSlider.value;
    int valueBlue = self.blueSlider.value;
    self.ImageView.backgroundColor = [UIColor colorWithRed:valueRed/225.0 green:valueGreen/255.0 blue:valueBlue/255.0 alpha:1];
}

@end
